﻿using System;

namespace Server.Net
{
    class AsyncUserToken
    {
        public const int Begin = 0;
        public const int WaitNextPackagePart = 1;
        public const int WaitNextSpillOverPackagePart = 2;

        private String userName;
		public String UserName
		{
			get{return userName;}
			set{userName = value;}
		}
		
		private int userLevel;
		public int UserLevel
		{
			get{return userLevel;}
			set{userLevel = value;}
		}
		
		private int state;
		public int State
		{
			get{return state;}
			set{state = value;}
		}
		
		private int receiveDataLength;
		public int ReceiveDataLength
		{
			get{return receiveDataLength;}
			set{receiveDataLength = value;}
		}
		
		private int packageLength;
        public int PackageLength
		{
			get{return packageLength;}
			set{packageLength = value;}
		}
		
		private byte[] buffer;
		public byte[] Buffer
		{
			get{return buffer;}
			set{buffer = value;}
		}
		
		private int offset;
		public int Offset
		{
            get { return offset; }
            set { offset = value; }
		}
		
		public AsyncUserToken()
		{
            state = AsyncUserToken.Begin;
            offset = 0;
            packageLength = 0;
            receiveDataLength = 0;
			userLevel = -255;
			buffer = null;
		}
    }
}
